-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize container launch priority performance #1490
Optimize container launch priority performance #1490
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1490 +/- ##
==========================================
+ Coverage 48.40% 48.61% +0.20%
==========================================
Files 157 157
Lines 22440 22460 +20
==========================================
+ Hits 10862 10918 +56
+ Misses 10387 10345 -42
- Partials 1191 1197 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
apis/apps/pub/launch_priority.go
Outdated
@@ -29,4 +29,8 @@ const ( | |||
ContainerLaunchPriorityKey = "apps.kruise.io/container-launch-priority" | |||
// ContainerLaunchOrdered is the annotation value that indicates containers in pod should be launched by ordinal. | |||
ContainerLaunchOrdered = "Ordered" | |||
|
|||
// ContainerLaunchPriorityCompletedKey is the label indicates the pod has all its priorities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ContainerLaunchPriorityCompletedKey is an annotation not label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -17,6 +17,7 @@ limitations under the License. | |||
package containerlaunchpriority |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file name containers a typo, plz rename it to container_launch_priority.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -94,6 +93,30 @@ func add(mgr manager.Manager, r *ReconcileContainerLaunchPriority) error { | |||
return nil | |||
} | |||
|
|||
func shouldEnqueue(pod *v1.Pod, r client.Reader) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz add ut for shouldEnqueue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
82cdc28
to
d2ac892
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ⅰ. Describe what this PR does
Optimize container launch priority performance: